﻿namespace Reap.AzureResource.Data.Infrastructure
{
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.Linq.Expressions;

	public interface IRepository<T>
		where T : class
	{
		#region Public Methods and Operators

		T Add(T entity);

		void Delete(T entity);

		IEnumerable<T> GetAll();

		T GetById(int id);

		IEnumerable<T> GetMany(Expression<Func<T, bool>> where);

		IQueryable<T> Query(Expression<Func<T, bool>> where);

		void Update(T entity);

		#endregion
	}
}